package com.future.mayi.activity;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.future.baselib.utils.ApiCst;
import com.future.baselib.utils.HttpRequest;
import com.future.mayi.R;
import com.future.mayi.dialog.KefuDialog;
import com.future.mayi.model.KefuModel;
import com.future.mayi.response.KefuResponse;
import com.future.mayi.utils.SharedPreferencesUtils;

import butterknife.BindView;
import butterknife.OnClick;

public class AccountStateActivity extends BaseTitleActivity {
    @BindView(R.id.iv_icon)
    ImageView ivIcon;
    @BindView(R.id.tv_state)
    TextView tvState;
    @BindView(R.id.tv_reason)
    TextView tvReason;
    @BindView(R.id.tv_enter)
    TextView tvEnter;
    private int userStatus;

    @Override
    protected void initTopBar() {
        initBack();
        getTitleText().setText("团长入驻审核中");
    }

    @Override
    protected void initLayout() {
        setContentView(R.layout.activity_account_state);
    }

    @Override
    protected void initView() {


    }


    @Override
    protected void initDates() {
        userStatus = (int) SharedPreferencesUtils.get(mContext, SharedPreferencesUtils.SpEnum.LoginStatus, 0);
        String state = "";
        if (userStatus == 0 || userStatus == -1) {
            state = "团长入驻审核中，请耐心等待";
            tvReason.setVisibility(View.GONE);
        } else if (userStatus == 10) {
            state = "团长入驻不通过";
            tvReason.setVisibility(View.VISIBLE);
            tvReason.setText("原因：" + SharedPreferencesUtils.get(mContext, SharedPreferencesUtils.SpEnum.LoginRefusalReason, ""));
        }
        tvState.setText(state);
    }

    @Override
    protected void initListener() {

    }


    @OnClick(R.id.tv_enter)
    public void onClick() {
        new KefuDialog(this).show(0);
    }





}
